<template>
	<view class="u-page">


		<u-navbar :safeAreaInsetTop="false" title="分行路线" :fixed="false" left-text="首页" right-text="添加" @rightClick="rightClick"
			@leftClick="leftClick" rightIcon="plus"> </u-navbar>
        


			<view v-for="(item, index) in indexList" :key="index">
				<view  @click="showfeixing(item)">
					 
						<text class="u-cell-text">单位:{{ item.dwmc }},用途:{{ item.fxbygs }}</text>
						 
					</view>

					<view  >
						<text class="u-cell-text">报备日期:{{ item.baobei }}</text>
						<text class="u-cell-text">联系人:{{ item.xm }}-{{ item.lxdh }}</text>
					</view>
				</view>
			</view>

 
	</view>
</template>

<script>
	export default {
		data() {
			return {
				indexList: [],
				page:0,
				urls: [
					'https://cdn.uviewui.com/uview/album/1.jpg',
					'https://cdn.uviewui.com/uview/album/2.jpg',
					'https://cdn.uviewui.com/uview/album/3.jpg',
					'https://cdn.uviewui.com/uview/album/4.jpg',
					'https://cdn.uviewui.com/uview/album/5.jpg',
					'https://cdn.uviewui.com/uview/album/6.jpg',
					'https://cdn.uviewui.com/uview/album/7.jpg',
					'https://cdn.uviewui.com/uview/album/8.jpg',
					'https://cdn.uviewui.com/uview/album/9.jpg',
					'https://cdn.uviewui.com/uview/album/10.jpg'
				]
			};
		},
		onLoad() {
			this.loadmore();
		},
		methods: {

//add url
			rightClick() {
				 
				 uni.$u.route({url: '/pages/index/wurenji/addluxian' })       
				
			},

			leftClick() {
				uni.$u.route({type: 'tab',url: 'pages/index/index'})
			//	console.log('leftClick');
			},
			showfeixing() {
				uni.$u.route({
					url: 'pages/wurenji/wrjfeidetail',
					params: {
						name: 'lisa'
					}
				})
			},
			scrolltolower() {
				this.loadmore();
			},
			loadmore() {
				
				this.page++;
				 this.$api.feixinglst({page:this.page}).then(res => {
								console.log(res);
								 
								this.indexList=res.bizlst;
                                console.log(this.indexList);
								
								 
							  }); 
				
				
				// for (let i = 0; i < 30; i++) {
				// 	this.indexList.push({
				// 		name: '飞行路线' + i,
				// 		yongtu: '喷撒农药',
				// 		baobei: '22/05/01',
				// 		linkman: '13305330022',
				// 		url: this.urls[uni.$u.random(0, this.urls.length - 1)]
				// 	});
				// }
			}
		}
	};
</script>

<style lang="scss">
	.cell-page {
		padding-bottom: 20px;
	}

	.cell-box {
		&__title {
			font-size: 14px;
			color: rgb(143, 156, 162);
			margin: 20px 0px 0px 15px;
		}

		&__block {
			// background-color: #fff;
			margin-top: 20px;
		}
	}

	 
 

	.u-cell-text {
		font-size: 15px;
		line-height: 22px;
		color: #303133;
		margin-right: 5px;
	}

	.u-slot-value {
		line-height: 17px;
		text-align: center;
		font-size: 10px;
		padding: 0 5px;
		height: 17px;
		color: #ffffff;
		border-radius: 100px;
		background-color: #f56c6c;
	}
</style>
